﻿using MobilesStore.Domain.Abstract;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MobilesStore.Domain.Entities;

namespace MobilesStore.Domain.Concrete
{
    public class EFCommentRepository:ICommentRepository
    {
        EFDBContext context = new EFDBContext();

        public IQueryable<Comment> Comments
        {
            get { return context.Comments; }
        }

        public void SaveComment(Comment comment)
        {
            context.Comments.Add(comment);
            context.SaveChanges();
        }
    }
}
